-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-15200] add "generated credential" screen reader notification #12877
[PM-15200] add "generated credential" screen reader notification #12877
Conversation
New Issues (2)Checkmarx found the following issues in this Pull Request
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #12877 +/- ##
==========================================
+ Coverage 35.13% 35.24% +0.11%
==========================================
Files 3001 2997 -4
Lines 91369 90881 -488
Branches 17102 16972 -130
==========================================
- Hits 32104 32034 -70
+ Misses 56758 56359 -399
+ Partials 2507 2488 -19 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
♻️ There's a lot of repetition in the generator files because the generator output box needs to be factored out into a separate component (PM-16235).
@@ -205,6 +213,10 @@ export class PasswordGeneratorComponent implements OnInit, OnDestroy { | |||
}); | |||
} | |||
|
|||
private announce(message: string) { | |||
this.ariaLive.announce(message).catch((e) => this.logService.error(e)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 I tried writing this using a custom aria region and it simply wouldn't work. Luckily, @willmartian pointed out the LiveAnnouncer
works. I wrapped it in a method so that the promise handling doesn't clutter up the observable bindings, which are already fairly complex.
@@ -161,10 +162,10 @@ export type SingleUserDependency = { | |||
* @remarks This dependency is useful when you have a nondeterministic | |||
* or stateful algorithm that you would like to run when an event occurs. | |||
*/ | |||
export type OnDependency = { | |||
export type OnDependency<T = any> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 The = any
default type preserves existing uses of the OnDependency
, which use emissions without using the emitted value. The T
type parameter allows consumers to specify a specific type for when the observer requires invocation-specific arguments.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-15200
📔 Objective
Notify users with screen readers when a new credential is generated.
📸 Screenshots
N/A
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes